package HelperFinancial.Class;

import java.text.DecimalFormat;

import android.text.format.DateFormat;

public class Credito {
	private Integer id;
	private String name;
	private double value;
	private int qntdMeses;
	private String dateDuration;
	private int idPai;
	private int qntdCorrente;
	
	
	public Credito() {
		name = "";
		value = 0.0;
		qntdMeses = 1;
		dateDuration = "";
	}
	
	public Credito(Integer id, String name, int qntdMeses, double value, String duration) {
		this.id = id;
		this.name = name;
		this.value = value;
		this.qntdMeses = qntdMeses;
		this.dateDuration = duration.trim();		
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getValue() {
		DecimalFormat fmt = new DecimalFormat("0.00");
		return fmt.format(value);
	}
	
	public double getValueInDouble() {
		return this.value;
	}

	public void setValue(double value) {
		this.value = value;
	}

	public int getQntdMeses() {
		return qntdMeses;
	}

	public void setQntdMeses(int qntdMeses) {
		this.qntdMeses = qntdMeses;
	}

	public String getDateDuration() {
		return dateDuration;
	}

	public void setDateDuration(String dateDuration) {
		this.dateDuration = dateDuration.trim();
	}
	
	public int getIdPai() {
		return idPai;
	}

	public void setIdPai(int idPai) {
		this.idPai = idPai;
	}

	public int getQntdCorrente() {
		return qntdCorrente;
	}

	public void setQntdCorrente(int qntdCorrente) {
		this.qntdCorrente = qntdCorrente;
	}

	public Integer getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	
}
